#include <stdio.h>
int main(){
	int a1 = 1234;
	int b2 = a1%10;//4
	int c3 = a1%100;//34
	int d4 = a1%1000;//234
	int e = a1/1000;//1
	
	
	int b = b2;//4
	int c = (c3-b)/10;//3
	int d = (d4-c*10-b)/100;//2
	
	printf("%d\n%d\n%d\n%d\n",b,c,d,e);
	return 0;
}
